namespace Apps.Models
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.Spatial;

    [Table("CONTRACT_INFO")]
    public partial class CONTRACT_INFO
    {
        //[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public CONTRACT_INFO()
        {
            CONTRACT_AMOUNT = new HashSet<CONTRACT_AMOUNT>();
            CONTRACT_DETAIL = new HashSet<CONTRACT_DETAIL>();
            CONTRACT_MONTH = new HashSet<CONTRACT_MONTH>();
            CONTRACT_QUALITY = new HashSet<CONTRACT_QUALITY>();
            CONTRACT_SETTLEMENT = new HashSet<CONTRACT_SETTLEMENT>();
            CONTRACT_QUALITY_CHECK = new HashSet<CONTRACT_QUALITY_CHECK>();
        }

        [Key]
        [StringLength(40)]
        public string CONTRACT_ID { get; set; }

        [StringLength(40)]
        public string SUPPLIER_ID { get; set; }

        [StringLength(30)]
        public string ECONTRACT_CODE { get; set; }

        public short? ECONTRACT_TYPE { get; set; }

        [StringLength(30)]
        public string NAME { get; set; }

        [StringLength(40)]
        public string VERSION { get; set; }

        public short? CATEGORY { get; set; }

        public decimal? MONEY_TOTAL { get; set; }

        public decimal? GOODS_TOTAL { get; set; }

        [StringLength(100)]
        public string SIGN_ADDRESS { get; set; }

        public DateTime? SIGN_DATE { get; set; }

        public short? TRANSPORT_TYPE { get; set; }

        public DateTime? VALID_BEGIN { get; set; }

        public DateTime? VALID_END { get; set; }

        public DateTime? PURCHASE_BEGIN { get; set; }

        public DateTime? PURCHASE_END { get; set; }

        public short? DELIVERY_TYPE { get; set; }

        [StringLength(300)]
        public string MARK { get; set; }

        [StringLength(300)]
        public string AGREED { get; set; }

        [StringLength(300)]
        public string DUTY { get; set; }

        [StringLength(300)]
        public string FORCEMAJOR { get; set; }

        [StringLength(300)]
        public string ARGUE { get; set; }

        [StringLength(300)]
        public string EXTERNAL_CODE { get; set; }

        public short? CURRENCY { get; set; }

        public decimal? RATE { get; set; }

        public bool? TAX { get; set; }

        public short? ISUNIQUE { get; set; }

        public short? DETAIL_TYPE { get; set; }

        [StringLength(300)]
        public string MODUAL { get; set; }

        [StringLength(300)]
        public string SETTLE_MARK { get; set; }

        public short? PAYMENT_TYPE { get; set; }

        public decimal? ADVANCE_RATIO { get; set; }

        public decimal? SETTLE_RATIO { get; set; }

        public short? VALUATION_METHOD { get; set; }

        [StringLength(40)]
        public string SETTLE_UNIT { get; set; }

        public short? AUDIT_STATUS { get; set; }

        [StringLength(40)]
        public string COMPILE_USER { get; set; }

        public DateTime? COMPILE_DATE { get; set; }

        [StringLength(40)]
        public string RELATION_VERSION { get; set; }

        public short? SETTLE_TYPE { get; set; }

        [StringLength(40)]
        public string TEMPLATE_ID { get; set; }

        public byte? APPROVAL_STATUS { get; set; }

        [StringLength(40)]
        public string PLAN_PURCHASE_ID { get; set; }

        //[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<CONTRACT_AMOUNT> CONTRACT_AMOUNT { get; set; }

        //[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<CONTRACT_DETAIL> CONTRACT_DETAIL { get; set; }

        //[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<CONTRACT_MONTH> CONTRACT_MONTH { get; set; }

        //[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<CONTRACT_QUALITY> CONTRACT_QUALITY { get; set; }

        //[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<CONTRACT_SETTLEMENT> CONTRACT_SETTLEMENT { get; set; }

        //[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<CONTRACT_QUALITY_CHECK> CONTRACT_QUALITY_CHECK { get; set; }

        public virtual PUB_SUPPLIER PUB_SUPPLIER { get; set; }

       
        //public virtual Flow_Form TEMPLATE { get; set; } 
         
    }
}
